/*
 * Copyright (c) 2020, QST Innovation Technology Group Co.,Ltd and/or its affiliates. All rights reserved.
 * QST Innovation Technology Group Co.,Ltd PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.example.rabbitmqdemo.controller;

import com.example.rabbitmqdemo.service.RabbitMQService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 发送消息controller
 *
 * @author liulindong
 * @since 2023/2/2 16:08
 */
@RestController
public class SendMsgController {


    private final RabbitMQService rabbitMQService;


    public SendMsgController(RabbitMQService rabbitMQService) {
        this.rabbitMQService = rabbitMQService;
    }

    @PostMapping("/send")
    public void sendMsg() {
        rabbitMQService.sendMsg("hello lindong!");
    }
}
